#!/bin/bash

# Copyright 2014 Treode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build and run the periodic tests.
#
# This script works with the Jenkins service, which triggers the build periodically. It runs this
# script to run all the periodic tests, which are those tests that use a psuedo-random number
# generator to create test-cases and drive test-behavior. Jenkins runs this script periodically to
# continuously seed the PRNG with different values.
#
# Specifically, this script
# 1) Builds the libraries for the Treode store.
# 2) Runs the periodic tests.

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
. $DIR/scripts/build-functions.sh

# Number of seeds for pseudo-random tests.
export NSEEDS=100

clean

echo-do ${SBT} test:compile
echo-do ${SBT} periodic:test

wrapup
